<?php 
class CMS_globals{
    
    private static $ADMIN_PARAMS = array();
    
    public static function get_admin_attr($param_name , $if_empty_string = ""){
        if(isset(self::$ADMIN_PARAMS[$param_name])){
            return self::$ADMIN_PARAMS[$param_name];
        }
        $admin_config = AdminConfigPeer::get_by_name($param_name);
        
        self::$ADMIN_PARAMS[$param_name] = $admin_config ? $admin_config->getValue() : $if_empty_string;
        return self::$ADMIN_PARAMS[$param_name];
    }
    
}
